cargo.git
10 years agoChange the no_term test to run an external process.
Mike Boutin [Tue, 4 Aug 2015 22:49:24 +0000 (18:49 -0400)]
Change the no_term test to run an external process.

Remove $TERM from the new process' environment and verify that output
is not sent to stderr.

10 years agoAdd `no_term` test that ensures correct output when a
Mike Boutin [Tue, 4 Aug 2015 01:11:34 +0000 (21:11 -0400)]
Add `no_term` test that ensures correct output when a
`TerminfoTerminal` cannot be created.

10 years agoCheck for TermInfo availability to see if color output is possible
Mike Boutin [Sun, 2 Aug 2015 01:09:52 +0000 (21:09 -0400)]
Check for TermInfo availability to see if color output is possible
before attempting to create a colored terminal.

10 years agoImplement --color [auto|always|never].
Mike Boutin [Fri, 17 Jul 2015 23:41:56 +0000 (19:41 -0400)]
Implement --color [auto|always|never].

Closes #1363.

10 years agoAuto merge of #1874 - alexcrichton:yet-another-windows-flaky-tests-zomg, r=alexcrichton
bors [Tue, 4 Aug 2015 03:49:24 +0000 (03:49 +0000)]
Auto merge of #1874 - alexcrichton:yet-another-windows-flaky-tests-zomg, r=alexcrichton

Windows doesn't like us deleting files right after running a process that works
on them, so be sure to call `cargo` instead of `cargo_process`.

10 years agoFix a flaky tests on Windows
Alex Crichton [Tue, 4 Aug 2015 03:46:24 +0000 (20:46 -0700)]
Fix a flaky tests on Windows

Windows doesn't like us deleting files right after running a process that works
on them, so be sure to call `cargo` instead of `cargo_process`.

10 years agoAuto merge of #1873 - alexcrichton:fix-transitive-activation, r=brson
bors [Mon, 3 Aug 2015 23:42:07 +0000 (23:42 +0000)]
Auto merge of #1873 - alexcrichton:fix-transitive-activation, r=brson

When activating the feature `foo/bar` you're actually activating both the
feature `foo` and the `bar` feature of the relevant package. Cargo previously
forgot to activate the `foo` feature, and this commit fixes that up.

Closes #1871

10 years agoFix activating features in dependencies transitively
Alex Crichton [Mon, 3 Aug 2015 22:10:31 +0000 (15:10 -0700)]
Fix activating features in dependencies transitively

When activating the feature `foo/bar` you're actually activating both the
feature `foo` and the `bar` feature of the relevant package. Cargo previously
forgot to activate the `foo` feature, and this commit fixes that up.

Closes #1871

10 years agoAuto merge of #1868 - alex:patch-2, r=alexcrichton
bors [Mon, 3 Aug 2015 01:40:34 +0000 (01:40 +0000)]
Auto merge of #1868 - alex:patch-2, r=alexcrichton

10 years agoAuto merge of #1867 - alex:patch-1, r=alexcrichton
bors [Mon, 3 Aug 2015 01:22:36 +0000 (01:22 +0000)]
Auto merge of #1867 - alex:patch-1, r=alexcrichton

10 years agoFixed a typo in a comment.
Alex Gaynor [Sun, 2 Aug 2015 23:16:18 +0000 (19:16 -0400)]
Fixed a typo in a comment.

10 years agoFixed a typo in a comment.
Alex Gaynor [Sun, 2 Aug 2015 23:15:57 +0000 (19:15 -0400)]
Fixed a typo in a comment.

10 years agoAuto merge of #1862 - ucarion:ucarion-fix-typo, r=alexcrichton
bors [Fri, 31 Jul 2015 03:34:47 +0000 (03:34 +0000)]
Auto merge of #1862 - ucarion:ucarion-fix-typo, r=alexcrichton

`layou tis` -> `layout is` :smile:

10 years agoFix a typo
Ulysse Carion [Fri, 31 Jul 2015 03:01:08 +0000 (20:01 -0700)]
Fix a typo

10 years agoAuto merge of #1860 - alexcrichton:use-filetime-set-file-times, r=alexcrichton
bors [Wed, 29 Jul 2015 17:27:23 +0000 (17:27 +0000)]
Auto merge of #1860 - alexcrichton:use-filetime-set-file-times, r=alexcrichton

Don't vendor the implementation locally.

Closes #1859

10 years agoUse filetime for set_file_times
Alex Crichton [Wed, 29 Jul 2015 17:25:22 +0000 (10:25 -0700)]
Use filetime for set_file_times

Don't vendor the implementation locally.

Closes #1859

10 years agoAuto merge of #1857 - vyskocilm:master, r=alexcrichton
bors [Tue, 28 Jul 2015 22:06:00 +0000 (22:06 +0000)]
Auto merge of #1857 - vyskocilm:master, r=alexcrichton

Solution: add a note about calling git submodule to README.md

10 years agoremove the name of submodule per recomendation of @alexcrichton
Michal Vyskocil [Tue, 28 Jul 2015 22:01:11 +0000 (00:01 +0200)]
remove the name of submodule per recomendation of @alexcrichton

10 years agoProblem: make install fail on non-existing rust-installer
Michal Vyskocil [Tue, 28 Jul 2015 21:38:22 +0000 (23:38 +0200)]
Problem: make install fail on non-existing rust-installer

Solution: add a note about calling git submodule to README.md

10 years agoAuto merge of #1853 - apjanke:zsh-compl-fix-parse-near-manifest, r=alexcrichton
bors [Tue, 28 Jul 2015 16:06:38 +0000 (16:06 +0000)]
Auto merge of #1853 - apjanke:zsh-compl-fix-parse-near-manifest, r=alexcrichton

Fixes a syntax error in the zsh completion definition.

The `[[ $foo ]]` test isn't valid for zsh; it needs `-z` or `-n`. This PR changes the `! [[ $manifest ]]` which appeared to be checking for an empty manifest to `[[ -z $manifest ]]`, which is the zsh syntax for it.

Fixes #1852.
Addresses homebrew/homebrew#41374.

I tested this on OS X 10.9. I only tested the `zsh` completion behavior, since Rust itself is unchanged by this.

The #920 PR looks like it was trying to do the same thing, but it got the semantics wrong. Putting `!` and `[[` together as `![[` removes the syntax error, but not because `![[ $x ]]` is a test for nonempty; `![[` is now a history backreference. The `!` needs to be its own word to be used as a logical "not".

10 years agozsh completion: fix [[ ... ]] conditional syntax
Andrew Janke [Tue, 28 Jul 2015 08:41:41 +0000 (04:41 -0400)]
zsh completion: fix [[ ... ]] conditional syntax

10 years agoAuto merge of #1850 - alexcrichton:update-docopt, r=alexcrichton
bors [Tue, 28 Jul 2015 01:10:24 +0000 (01:10 +0000)]
Auto merge of #1850 - alexcrichton:update-docopt, r=alexcrichton

Closes #1426

10 years agoUpdate docopt to fix forwarding `--`
Alex Crichton [Tue, 28 Jul 2015 01:08:28 +0000 (18:08 -0700)]
Update docopt to fix forwarding `--`

Closes #1426

10 years agoAuto merge of #1847 - steveklabnik:gh1707, r=alexcrichton
bors [Mon, 27 Jul 2015 23:18:25 +0000 (23:18 +0000)]
Auto merge of #1847 - steveklabnik:gh1707, r=alexcrichton

Fixes #1707

10 years agoLink manifst docs to version info in crates.io docs
Steve Klabnik [Mon, 27 Jul 2015 20:15:21 +0000 (16:15 -0400)]
Link manifst docs to version info in crates.io docs

Fixes #1707

10 years agoAuto merge of #1849 - alexcrichton:appveyor-master, r=alexcrichton
bors [Mon, 27 Jul 2015 23:06:16 +0000 (23:06 +0000)]
Auto merge of #1849 - alexcrichton:appveyor-master, r=alexcrichton

We're generating a lot of builds for the `tmp`, `auto-cargo`, and `gh-pages` branches...

10 years agoOnly run appveyor on the master branch
Alex Crichton [Mon, 27 Jul 2015 23:01:41 +0000 (16:01 -0700)]
Only run appveyor on the master branch

10 years agoAuto merge of #1848 - alexcrichton:less-cyclic, r=huonw
bors [Mon, 27 Jul 2015 22:50:25 +0000 (22:50 +0000)]
Auto merge of #1848 - alexcrichton:less-cyclic, r=huonw

This optimization ended up not being correct with the recent switch to being
more recursive, and after some profiling it looks like this optimization for
memory usage isn't even needed any more. This commit removes the `Rc` sharing,
fixing #1841 in the process.

Closes #1841

10 years agoRemove an Rc optimization that's no longer necessary
Alex Crichton [Mon, 27 Jul 2015 22:40:02 +0000 (15:40 -0700)]
Remove an Rc optimization that's no longer necessary

This optimization ended up not being correct with the recent switch to being
more recursive, and after some profiling it looks like this optimization for
memory usage isn't even needed any more. This commit removes the `Rc` sharing,
fixing #1841 in the process.

Closes #1841

10 years agoAuto merge of #1843 - steveklabnik:gh1279, r=alexcrichton
bors [Mon, 27 Jul 2015 21:13:09 +0000 (21:13 +0000)]
Auto merge of #1843 - steveklabnik:gh1279, r=alexcrichton

* use crates.io example
* mention absolute paths

Fixes #1279

10 years agoAuto merge of #1844 - steveklabnik:gh1407, r=alexcrichton
bors [Mon, 27 Jul 2015 19:16:34 +0000 (19:16 +0000)]
Auto merge of #1844 - steveklabnik:gh1407, r=alexcrichton

Fixes #1407

10 years agoAdd mention of specific tests in guide
Steve Klabnik [Mon, 27 Jul 2015 18:49:50 +0000 (14:49 -0400)]
Add mention of specific tests in guide

Fixes #1407

10 years agoUpdate override documentation
Steve Klabnik [Mon, 27 Jul 2015 18:45:44 +0000 (14:45 -0400)]
Update override documentation

* use crates.io example
* mention absolute paths

Fixes #1279

10 years agoAuto merge of #1842 - steveklabnik:gh1177, r=alexcrichton
bors [Mon, 27 Jul 2015 18:43:49 +0000 (18:43 +0000)]
Auto merge of #1842 - steveklabnik:gh1177, r=alexcrichton

While doing this, I noticed that the manifest documentation does mention that
'cargo test' tests examples, so this also includes some information about this
in the guide.

Fixes #1177

10 years agoMention doc tests with cargo test.
Steve Klabnik [Mon, 27 Jul 2015 18:35:37 +0000 (14:35 -0400)]
Mention doc tests with cargo test.

While doing this, I noticed that the manifest documentation does mention that
'cargo test' tests examples, so this also includes some information about this
in the guide.

Fixes #1177

10 years agoAuto merge of #1837 - alexcrichton:travis-parallel, r=alexcrichton
bors [Mon, 27 Jul 2015 17:38:01 +0000 (17:38 +0000)]
Auto merge of #1837 - alexcrichton:travis-parallel, r=alexcrichton

This was previously set as travis would frequently fail to spawn a new process
due to resource limits being hit, but now that we're using `sudo: false` it's
looking like that infrastructure is more robust and we may be able to run tests
in parallel.

10 years agoTest 32-bit Windows on appveyor
Alex Crichton [Sun, 26 Jul 2015 17:05:02 +0000 (10:05 -0700)]
Test 32-bit Windows on appveyor

10 years agoAuto merge of #1827 - mark-buer:config-tool-paths, r=alexcrichton
bors [Mon, 27 Jul 2015 04:24:09 +0000 (04:24 +0000)]
Auto merge of #1827 - mark-buer:config-tool-paths, r=alexcrichton

~~... and adds support for absolute path rustc and rustdoc tools.~~

10 years agoEnables support for relative pathed linker and ar tools.
Mark Buer [Fri, 24 Jul 2015 06:35:53 +0000 (18:35 +1200)]
Enables support for relative pathed linker and ar tools.

10 years agoAuto merge of #1836 - alexcrichton:fix-nightly, r=alexcrichton
bors [Sun, 26 Jul 2015 17:02:25 +0000 (17:02 +0000)]
Auto merge of #1836 - alexcrichton:fix-nightly, r=alexcrichton

The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty `enum`s anyway, however, to ensure they're never created.

10 years agoTry being more parallel on travis
Alex Crichton [Sun, 26 Jul 2015 17:02:13 +0000 (10:02 -0700)]
Try being more parallel on travis

This was previously set as travis would frequently fail to spawn a new process
due to resource limits being hit, but now that we're using `sudo: false` it's
looking like that infrastructure is more robust and we may be able to run tests
in parallel.

10 years agoFix compile on nightly
Alex Crichton [Sun, 26 Jul 2015 15:58:59 +0000 (08:58 -0700)]
Fix compile on nightly

The lints for C apis were tweaked recently and 0-size structs aren't liked.
These should be empty `enum`s anyway, however, to ensure they're never created.

10 years agoAuto merge of #1835 - gentoo90:bash-comp, r=alexcrichton
bors [Sun, 26 Jul 2015 15:58:02 +0000 (15:58 +0000)]
Auto merge of #1835 - gentoo90:bash-comp, r=alexcrichton

10 years agoBashcomp: improve performance
gentoo90 [Sun, 26 Jul 2015 11:21:44 +0000 (14:21 +0300)]
Bashcomp: improve performance

Calling `cargo --list` on every completion is too slow.
Call it once on bash start and cache the output.

10 years agoBashcomp: add missing options, add --vcs completion
gentoo90 [Sun, 26 Jul 2015 10:59:57 +0000 (13:59 +0300)]
Bashcomp: add missing options, add --vcs completion

10 years agoAuto merge of #1831 - alexcrichton:publish-cargo, r=huonw
bors [Sat, 25 Jul 2015 00:48:43 +0000 (00:48 +0000)]
Auto merge of #1831 - alexcrichton:publish-cargo, r=huonw

This commit tweaks some metadata here and there to publish Cargo on crates.io.

* License fields are added to Cargo.tomls
* `registry` was renamed to `crates-io`
* API docs for the `cargo` crate are now generated via `make doc`

10 years agoTweak metadata to publish Cargo on crates.io
Alex Crichton [Fri, 24 Jul 2015 21:37:03 +0000 (14:37 -0700)]
Tweak metadata to publish Cargo on crates.io

This commit tweaks some metadata here and there to publish Cargo on crates.io.

* License fields are added to Cargo.tomls
* `registry` was renamed to `crates-io`
* API docs for the `cargo` crate are now generated via `make doc`

10 years agoAuto merge of #1829 - steveklabnik:doc_quickfix, r=alexcrichton
bors [Fri, 24 Jul 2015 17:02:37 +0000 (17:02 +0000)]
Auto merge of #1829 - steveklabnik:doc_quickfix, r=alexcrichton

10 years agoremove missing import from build script docs
Steve Klabnik [Fri, 24 Jul 2015 16:47:18 +0000 (12:47 -0400)]
remove missing import from build script docs

10 years agoAuto merge of #1825 - alexcrichton:msvc-32, r=brson
bors [Thu, 23 Jul 2015 06:16:34 +0000 (06:16 +0000)]
Auto merge of #1825 - alexcrichton:msvc-32, r=brson

These commits provide the necessary support to get cargo working in the 32-bit MSVC context. Now that we've got 32-bit MSVC nightlies rolling we can add support!

10 years agoDisable cross tests on appveyor for now
Alex Crichton [Wed, 22 Jul 2015 22:08:07 +0000 (15:08 -0700)]
Disable cross tests on appveyor for now

10 years agoTest 32/64 cross builds on MSVC
Alex Crichton [Wed, 22 Jul 2015 21:42:37 +0000 (14:42 -0700)]
Test 32/64 cross builds on MSVC

This commit enables Cargo's bots to test cross builds between 32 and 64 bit
hosts. Many tests were fixed to work on Windows, and the 32-bit test case now
actually crosses to 64.

10 years agoRemove MSVC logic from the configure script
Alex Crichton [Wed, 22 Jul 2015 21:38:35 +0000 (14:38 -0700)]
Remove MSVC logic from the configure script

Cargo will soon support testing the cross compilation capabilities between 32/64
bit Windows, meaning that there's not "one true value" for any of these
environment variables that Cargo is setting (e.g. where to find `cl`, `link`,
etc). Instead, all dependencies have been updated to probe the system (in the
same manner as the compiler) for the tools that they're using.

All of the logic is housed in the `gcc` crate which now exposes a function to
probe the system for a particular tool. The updated crates here then use the
result of this probe to run the various build scripts. This all boils down to
being able to build MSVC targets inside an MSYS shell instead of requiring use
of a MSVC shell (which doesn't allow for simultaneous host builds and cross
builds).

10 years agoUpdate the nightly of Rust to build Cargo
Alex Crichton [Wed, 22 Jul 2015 21:36:47 +0000 (14:36 -0700)]
Update the nightly of Rust to build Cargo

10 years agoetc: Remove an unused variable binding
Alex Crichton [Wed, 22 Jul 2015 21:36:19 +0000 (14:36 -0700)]
etc: Remove an unused variable binding

10 years agoetc: Don't modify the installation manifest
Alex Crichton [Wed, 22 Jul 2015 21:35:47 +0000 (14:35 -0700)]
etc: Don't modify the installation manifest

We're not actually using it as we're not running the installation script, so no
need to modify it.

10 years agoetc: Fix merging distributions on Windows
Alex Crichton [Wed, 22 Jul 2015 21:35:06 +0000 (14:35 -0700)]
etc: Fix merging distributions on Windows

The rustlib folder is in `bin` on Windows, not in `lib`.

10 years agoetc: Use Popen instead of call to spawn processes
Alex Crichton [Wed, 22 Jul 2015 21:33:52 +0000 (14:33 -0700)]
etc: Use Popen instead of call to spawn processes

I saw the usage of `call` locking up quite a bit when running this script on
Windows, and googling around on the internet seems to indicate that Popen should
be used instead of call to prevent this locking up, and it does indeed work!

10 years agoUse the download module for printing snapshots
Alex Crichton [Wed, 22 Jul 2015 21:33:21 +0000 (14:33 -0700)]
Use the download module for printing snapshots

The script that prints new snapshots for Cargo now uses the same download module
as the rest of Cargo. Also adds a quiet option to suppress printing.

10 years agoAuto merge of #1822 - alexcrichton:fix-recursion, r=brson
bors [Tue, 21 Jul 2015 17:36:53 +0000 (17:36 +0000)]
Auto merge of #1822 - alexcrichton:fix-recursion, r=brson

It looks like the empty string is leaking in as a feature to all crates being
published on crates.io unintentionally. This means that each dependency edge
activates the feature `""`. This in turn confuses the resolution process quite a
bit, causing it to be far more recursive than it should be.

The empty feature, `""`, is weeded out during activation of features but it's
never explicitly activated. This means that each new dependency we see has one
requested feature (the empty one) with no activated features (as it doesn't have
any). This ends up causing us to recurse to attempt to reactivate the
dependency. This extreme recursion ended up blowing the stack on some smaller
crates and this commit fixes that.

10 years agoWeed out empty features from the registry
Alex Crichton [Tue, 21 Jul 2015 17:16:15 +0000 (10:16 -0700)]
Weed out empty features from the registry

It looks like the empty string is leaking in as a feature to all crates being
published on crates.io unintentionally. This means that each dependency edge
activates the feature `""`. This in turn confuses the resolution process quite a
bit, causing it to be far more recursive than it should be.

The empty feature, `""`, is weeded out during activation of features but it's
never explicitly activated. This means that each new dependency we see has one
requested feature (the empty one) with no activated features (as it doesn't have
any). This ends up causing us to recurse to attempt to reactivate the
dependency. This extreme recursion ended up blowing the stack on some smaller
crates and this commit fixes that.

10 years agoTouch up some stylistic nits in the resolver
Alex Crichton [Tue, 21 Jul 2015 17:16:05 +0000 (10:16 -0700)]
Touch up some stylistic nits in the resolver

10 years agoAuto merge of #1819 - alexcrichton:fix-no-pkg-config, r=alexcrichton
bors [Mon, 20 Jul 2015 23:05:33 +0000 (23:05 +0000)]
Auto merge of #1819 - alexcrichton:fix-no-pkg-config, r=alexcrichton

Contains a fix for building on systems where pkg-config isn't installed.

Closes #1727

10 years agoUpdate libgit2-sys
Alex Crichton [Mon, 20 Jul 2015 23:03:18 +0000 (16:03 -0700)]
Update libgit2-sys

Contains a fix for building on systems where pkg-config isn't installed.

Closes #1727

10 years agoAuto merge of #1814 - gentoo90:no-git-build, r=alexcrichton
bors [Mon, 20 Jul 2015 04:44:34 +0000 (04:44 +0000)]
Auto merge of #1814 - gentoo90:no-git-build, r=alexcrichton

When built from archive, downloaded from https://github.com/rust-lang/cargo/releases
 version info looks like this: `cargo 0.3.0 ( ) (built 2015-05-16)`.
Patch will make it look like this: `cargo 0.3.0 (built 2015-05-16)`

10 years agoFix version info when built without git repo
gentoo90 [Sat, 18 Jul 2015 13:36:44 +0000 (16:36 +0300)]
Fix version info when built without git repo

10 years agoAuto merge of #1804 - alexcrichton:aggressively-backtrack, r=brson
bors [Fri, 17 Jul 2015 20:26:42 +0000 (20:26 +0000)]
Auto merge of #1804 - alexcrichton:aggressively-backtrack, r=brson

Resolving a dependency graph may involve quite a bit of backtracking to select
different versions of crates, but the previous implementation of resolution
would not backtrack enough.

Once a dependency is completely resolved it's possible that any number of
candidates for its transitive dependencies were left out of the resolution
process (e.g. we didn't hit them yet). These candidates were not previously used
for backtracking (because resolution overall of the dependency finished), but
this commit alters the implementation to instead consider these as candidates
for backtracking.

Architecturally this changes the code to CPS to pass around a `finished`
continuation to allow tweaking the behavior whenever a dependency successfully
resolves. The key change is then that whenever a candidate for a dependency is
activated, we ensure the recursive step for the rest of the graph happens as a
sub-call. This means that if *anything* in the recursive call fails (including
some previous up-the-stack resolution) we'll retry the next candidate.

Closes #1800

10 years agoRun travis against stable/beta/nightly
Alex Crichton [Fri, 17 Jul 2015 19:56:00 +0000 (12:56 -0700)]
Run travis against stable/beta/nightly

10 years agoBacktrack more aggressively when resolving
Alex Crichton [Mon, 13 Jul 2015 19:14:05 +0000 (12:14 -0700)]
Backtrack more aggressively when resolving

Resolving a dependency graph may involve quite a bit of backtracking to select
different versions of crates, but the previous implementation of resolution
would not backtrack enough.

Once a dependency is completely resolved it's possible that any number of
candidates for its transitive dependencies were left out of the resolution
process (e.g. we didn't hit them yet). These candidates were not previously used
for backtracking (because resolution overall of the dependency finished), but
this commit alters the implementation to instead consider these as candidates
for backtracking.

Architecturally this changes the code to CPS to pass around a `finished`
continuation to allow tweaking the behavior whenever a dependency successfully
resolves. The key change is then that whenever a candidate for a dependency is
activated, we ensure the recursive step for the rest of the graph happens as a
sub-call. This means that if *anything* in the recursive call fails (including
some previous up-the-stack resolution) we'll retry the next candidate.

Closes #1800

10 years agoUpdate Rust nightly
Alex Crichton [Tue, 14 Jul 2015 00:32:07 +0000 (17:32 -0700)]
Update Rust nightly

Looks like the new LLVM version has optimizations which help out a good deal
with the recursion faced in the resolver, so let's use that version instead!

10 years agoFix running `cargo test` from the project root
Alex Crichton [Mon, 13 Jul 2015 19:13:37 +0000 (12:13 -0700)]
Fix running `cargo test` from the project root

Previously the `cit` folder was placed in the root directory but this adds logic
to ensure it stays within the `target` subdirectory.

10 years agoAuto merge of #1812 - alexcrichton:moar-filtering, r=huonw
bors [Fri, 17 Jul 2015 17:23:19 +0000 (17:23 +0000)]
Auto merge of #1812 - alexcrichton:moar-filtering, r=huonw

Development dependencies are traversed during the resolution process, causing
them to be returned as the list of dependencies for a package in terms of
resolution. The compilation phase would then filter these out depending on the
dependency's transitivity, but this was incorrectly accounted for when the
dependency showed up multiple times in a few lists.

This commit fixes this behavior by updating the filtering logic to ensure that
only activated optional dependencies (those whose feature names are listed) are
compiled.

Closes #1805

10 years agoOnly compile activated optional dependencies
Alex Crichton [Fri, 17 Jul 2015 17:05:57 +0000 (10:05 -0700)]
Only compile activated optional dependencies

Development dependencies are traversed during the resolution process, causing
them to be returned as the list of dependencies for a package in terms of
resolution. The compilation phase would then filter these out depending on the
dependency's transitivity, but this was incorrectly accounted for when the
dependency showed up multiple times in a few lists.

This commit fixes this behavior by updating the filtering logic to ensure that
only activated optional dependencies (those whose feature names are listed) are
compiled.

Closes #1805

10 years agoRemove an unnecessary HashMap when Vec works
Alex Crichton [Fri, 17 Jul 2015 17:05:17 +0000 (10:05 -0700)]
Remove an unnecessary HashMap when Vec works

Dependencies aren't necessarily unique per name as the same dependency can show
up multiple times in various dependency kind lists, so it's not quite right to
use a hash map anyway.

10 years agoAuto merge of #1808 - Gankro:msg, r=alexcrichton
bors [Fri, 17 Jul 2015 05:53:58 +0000 (05:53 +0000)]
Auto merge of #1808 - Gankro:msg, r=alexcrichton

10 years agoAuto merge of #1810 - alexcrichton:update-rust-installer, r=alexcrichton
bors [Fri, 17 Jul 2015 05:36:21 +0000 (05:36 +0000)]
Auto merge of #1810 - alexcrichton:update-rust-installer, r=alexcrichton

Closes #1798

10 years agoUpdate rust-installer submodule
Alex Crichton [Thu, 16 Jul 2015 20:19:39 +0000 (13:19 -0700)]
Update rust-installer submodule

Closes #1798

10 years agofix error message copy-paste error
Alexis Beingessner [Wed, 15 Jul 2015 22:27:53 +0000 (15:27 -0700)]
fix error message copy-paste error

10 years agoAuto merge of #1803 - tafia:patch-1, r=alexcrichton
bors [Mon, 13 Jul 2015 16:47:21 +0000 (16:47 +0000)]
Auto merge of #1803 - tafia:patch-1, r=alexcrichton

This is a very tiny optimization ...

An unnecessary clone was done because of matching on a tuple.
Checking items separately avoids it entirely.

10 years agoavoid an unnecessary clone in without_prefix
Johann Tuffe [Mon, 13 Jul 2015 05:23:33 +0000 (13:23 +0800)]
avoid an unnecessary clone in without_prefix

This is a very tiny optimization ...

An unnecessary clone was done because of matching on a tuple.
Checking items separately avoids it entirely.

10 years agoAuto merge of #1792 - steveklabnik:gh26482, r=alexcrichton
bors [Wed, 8 Jul 2015 17:35:42 +0000 (17:35 +0000)]
Auto merge of #1792 - steveklabnik:gh26482, r=alexcrichton

In addition, clean up these docs a little.

Addresses part of rust-lang/rust#26482

10 years agoDont refer to NPM for semver
Steve Klabnik [Wed, 8 Jul 2015 17:16:56 +0000 (13:16 -0400)]
Dont refer to NPM for semver

In addition, clean up these docs a little.

Addresses part of rust-lang/rust#26482

10 years agoAuto merge of #1788 - alexcrichton:appveyor, r=brson
bors [Tue, 7 Jul 2015 22:17:05 +0000 (22:17 +0000)]
Auto merge of #1788 - alexcrichton:appveyor, r=brson

This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:

* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)

There are also a few minor updates made as part of this commit as well:

* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
  specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program

10 years agoRewrite dependency installation in Python
Alex Crichton [Tue, 7 Jul 2015 20:55:36 +0000 (13:55 -0700)]
Rewrite dependency installation in Python

This commit aims to have the end goal of adding AppVeyor CI support to this
repo, and along the way it ended up meaning that the dependency installation
bits were rewritten in Python. This has a number of benefits:

* Python is more portable than shell
* Python is more readable than shell
* curl is no longer required on Windows (powershell is used for downloads)

There are also a few minor updates made as part of this commit as well:

* The README has been updated in how to build Cargo
* We now use `sudo: false` on Travis for faster builds. This is done by
  specifying packages to install instead of installing them ourselves.
* pkg-config is no longer listed as a required program

10 years agoAuto merge of #1780 - seth:sf/nested-projects-fix, r=alexcrichton
bors [Tue, 7 Jul 2015 16:20:43 +0000 (16:20 +0000)]
Auto merge of #1780 - seth:sf/nested-projects-fix, r=alexcrichton

This is a fix for #1779

10 years agoUse info! instead of warn! for skipping message
Seth Falcon [Tue, 7 Jul 2015 01:40:36 +0000 (18:40 -0700)]
Use info! instead of warn! for skipping message

10 years agoAuto merge of #1776 - alexcrichton:no-entry-found-for-key-again, r=brson
bors [Tue, 7 Jul 2015 01:36:44 +0000 (01:36 +0000)]
Auto merge of #1776 - alexcrichton:no-entry-found-for-key-again, r=brson

Previously a Target was not considered to be in the key of the map to build
script dependencies, but this meant that information like whether it was a
dev-dependency was lost. As a result libraries would depend on the build scripts
of their dev-dependencies, causing an internal error when the build script
hadn't finished yet when the library was being built.

Closes #1751

10 years agoAuto merge of #1786 - eminence:docs, r=alexcrichton
bors [Tue, 7 Jul 2015 00:04:27 +0000 (00:04 +0000)]
Auto merge of #1786 - eminence:docs, r=alexcrichton

See also https://github.com/rust-lang/cargo/issues/1614

10 years agoUpdated guide.md with local config clarification
Andrew Chin [Mon, 6 Jul 2015 18:58:13 +0000 (14:58 -0400)]
Updated guide.md with local config clarification

See also https://github.com/rust-lang/cargo/issues/1614

10 years agoAuto merge of #1782 - Dineshs91:uninstall, r=alexcrichton
bors [Mon, 6 Jul 2015 17:07:59 +0000 (17:07 +0000)]
Auto merge of #1782 - Dineshs91:uninstall, r=alexcrichton

Fixes #1068.

10 years agoAdd test for ignoring nested self packages
Seth Falcon [Sun, 5 Jul 2015 18:34:43 +0000 (11:34 -0700)]
Add test for ignoring nested self packages

10 years agoRemove readme note for libgit2
Seth Falcon [Sun, 5 Jul 2015 18:33:57 +0000 (11:33 -0700)]
Remove readme note for libgit2

Indeed this seems to be handled by the build automatically.

10 years agoAdd make uninstall to .travis.yml
dinesh [Sun, 5 Jul 2015 17:34:37 +0000 (23:04 +0530)]
Add make uninstall to .travis.yml

10 years agoAuto merge of #1785 - kennytm:patch-1, r=alexcrichton
bors [Sun, 5 Jul 2015 18:01:28 +0000 (18:01 +0000)]
Auto merge of #1785 - kennytm:patch-1, r=alexcrichton

10 years agoFix minor typo in `cargo rustc --help`.
kennytm [Sun, 5 Jul 2015 17:57:05 +0000 (01:57 +0800)]
Fix minor typo in `cargo rustc --help`.

10 years agoPass prefix and destdir
dinesh [Sun, 5 Jul 2015 17:31:23 +0000 (23:01 +0530)]
Pass prefix and destdir

10 years agoAuto merge of #1783 - c4rlo:run-typos, r=alexcrichton
bors [Sun, 5 Jul 2015 16:53:33 +0000 (16:53 +0000)]
Auto merge of #1783 - c4rlo:run-typos, r=alexcrichton

10 years agocargo run: fix typos in help text
c4rlo [Sun, 5 Jul 2015 10:23:36 +0000 (11:23 +0100)]
cargo run: fix typos in help text

10 years agoAdd uninstall target
dinesh [Sat, 4 Jul 2015 08:17:28 +0000 (13:47 +0530)]
Add uninstall target

10 years agoDisallow nesting of packages with same packge_id
Seth Falcon [Fri, 3 Jul 2015 22:36:25 +0000 (15:36 -0700)]
Disallow nesting of packages with same packge_id

If a package contains a subdirectory that contains a copy of
itself (strange, but encountered in the wild in the context of an OS
package build tool), cargo was failing with a non-descriptive "An
unknown error occurred" (or "no package found in source" with
--verbose).

Since nested packages use the root path, such a package will have an
identical package_id to the root package. With this patch, we keep the
first occurance of a given package_id rather than overwritting --
effectively ignoring the nested package with duplicated name. A warn!
message is printed.